package com.example.auth.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.example.auth.datasource.DataSourceKey;
import com.example.auth.entity.Menu;
import com.example.auth.mapper.MenuMapper;
import com.example.auth.service.IMenuService;
import org.apache.ibatis.session.SqlSessionFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class MenuServiceImpl extends ServiceImpl<MenuMapper, Menu> implements IMenuService {

    @Autowired
    private MenuMapper menuMapper;
    @Override
    @DataSourceKey(value = "dataSourceSystem")
    public List<String> findPermissByUid(Long id) {
        return menuMapper.findPermissByUid(id);
    }

    @Override
    public List<String> findAuthoritiesByUid(Long id) {
        return menuMapper.findAuthoritiesByUid(id);
    }
}
